1use num_derive::{FromPrimitive, ToPrimitive};
23#[repr(i32)]
4#[derive(Clone, Copy, Debug, PartialEq, Eq, FromPrimitive, ToPrimitive)]
5/// Describes the priority of the window capture source.
6/// Used in `WindowCaptureSourceBuilder`
7pub enum ObsWindowPriority {
8/// The window class names must be the same. This means that windows are of the same type.
9Class = libobs::window_priority_WINDOW_PRIORITY_CLASS,
10/// Window titles must match otherwise, find window with the same class
11Title = libobs::window_priority_WINDOW_PRIORITY_TITLE,
12/// Match title, otherwise find window with the same executable
13Executable = libobs::window_priority_WINDOW_PRIORITY_EXE,
14}
1516#[repr(i32)]
17#[derive(Clone, Copy, Debug, PartialEq, Eq, FromPrimitive, ToPrimitive)]
18/// Describes the capture method of the window capture source.
19/// Used in `WindowCaptureSourceBuilder`
20pub enum ObsWindowCaptureMethod {
21/// Automatically selects the best method based on the window.
22MethodAuto = libobs::window_capture_method_METHOD_AUTO,
23/// Uses BitBlt to capture the window. BitBlt (Windows 7 and up)
24MethodBitBlt = libobs::window_capture_method_METHOD_BITBLT,
25/// Uses Windows Graphics Capture to capture the window. Windows 10 (1903 and up)
26MethodWgc = libobs::window_capture_method_METHOD_WGC,
27}
282930#[repr(i32)]
31#[derive(Clone, Copy, Debug, PartialEq, Eq, FromPrimitive, ToPrimitive)]
32/// Describes the capture method of the monitor capture source.
33/// Used in `MonitorCaptureSourceBuilder`
34pub enum ObsDisplayCaptureMethod {
35/// Automatically selects the best method based on the monitor.
36MethodAuto = libobs::display_capture_method_DISPLAY_METHOD_AUTO,
37/// Uses DXGI to capture the monitor.
38MethodDXGI = libobs::display_capture_method_DISPLAY_METHOD_DXGI,
39/// Uses Windows Graphics Capture to capture the monitor.
40MethodWgc = libobs::display_capture_method_DISPLAY_METHOD_WGC,
41}
424344#[repr(i32)]
45#[derive(Clone, Copy, Debug, PartialEq, Eq, FromPrimitive, ToPrimitive)]
46/// Describes the capture method of the window capture source.
47/// Used in `WindowCaptureSourceBuilder`
48pub enum ObsHookRate {
49 Slow = libobs::hook_rate_HOOK_RATE_SLOW,
50 Normal = libobs::hook_rate_HOOK_RATE_NORMAL,
51 Fast = libobs::hook_rate_HOOK_RATE_FAST,
52 Fastest = libobs::hook_rate_HOOK_RATE_FASTEST,
53}